package com.linkage.lcims.base.po.system;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** @author Hibernate CodeGenerator */
@SuppressWarnings("serial")
public class MdColumnSequencePK implements Serializable {

    /** identifier field */
    private String tablename;

    /** identifier field */
    private String columnname;

    /** full constructor */
    public MdColumnSequencePK(String tablename, String columnname) {
        this.tablename = tablename;
        this.columnname = columnname;
    }

    /** default constructor */
    public MdColumnSequencePK() {
    }

    /** 
     *                @hibernate.property
     *                 column="tablename"
     *             
     */
    public String getTablename() {
        return this.tablename;
    }

    public void setTablename(String tablename) {
        this.tablename = tablename;
    }

    /** 
     *                @hibernate.property
     *                 column="columnname"
     *             
     */
    public String getColumnname() {
        return this.columnname;
    }

    public void setColumnname(String columnname) {
        this.columnname = columnname;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("tablename", getTablename())
            .append("columnname", getColumnname())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof MdColumnSequencePK) ) return false;
        MdColumnSequencePK castOther = (MdColumnSequencePK) other;
        return new EqualsBuilder()
            .append(this.getTablename(), castOther.getTablename())
            .append(this.getColumnname(), castOther.getColumnname())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getTablename())
            .append(getColumnname())
            .toHashCode();
    }

}
